home *** CD-ROM | disk | FTP | other *** search
- Path: news.central.ntua.gr!not-for-mail
- From: hnick@central.ntua.gr (Nick C. Fotis)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Ceck out this bug. What the *** is SASC/6.56 doing?
- Date: 13 Mar 1996 14:17:49 GMT
- Organization: National Technical University of Athens, Greece
- Message-ID: <4i6led$stj@zeus.central.ntua.gr>
- References: <1120.6643T91T406@login.eunet.no> <4hvk1f$o0c@zeus.central.ntua.gr> <874.6644T381T2315@login.eunet.no> <4i17ga$doo@btmpjg.god.bel.alcatel.be> <885.6646T9T693@login.eunet.no>
- NNTP-Posting-Host: gate2-zeus.central.ntua.gr
- X-Newsreader: NN version 6.5.0 #1 (NOV)
-
- patrick.hanevold@login.eunet.no (Patrick Hanevold) writes:
-
-
- >>>Tryed "Stack check" and all that. No difference.
- >>>Anyway, the default stack is 4K isnt it?
- >>>Cant think of anything using that additional 1K.
- >>>Dont want it global. Allocate it myself now.
- >>>
- >>OpenScreenTags() need stack too!! Together with the already used stack
- >>by _main, and the 3252 bytes of main(), you only have about 800 bytes
- >>left for OpenScreenTags(), might be too small. Stackcheck will not
- >>find this, because stackcheck does not know the stack-usage of
- >>OpenScreenTags().
-
- >OpenScreenTags() doesnt crash. exit(0) does.
- >I guess it maby could mess up so exit(0) would crash.
- >Stach check should be smart enough to fail if there was too litle stack left.
- >I would guess none of the OS calls would need more then 4K since thats the
- >default stack size.
-
- exit(0) probably crashes cause it peeks a wrong return address from the stack
- You are right OS calls need no more than 4k but when you call the OpenScreen-
- Tags you are left with less than one kilobyte of stack.
-
- I dont think a compiler can ever check if stack will overflow when a call
- will be made to a function that wasn't compiled so to include code for
- stack checking.
-
- My guess is that if you had the OS source and you had compiled it with 'stack
- checking' then your program wouldn't crash.
-
-
- ><sb>Patrick Hanevold - Virtual Reality developer
- ><sb>patrick.hanevold@login.eunet.no
- ><sb>Amiga and official Be developer
-
- --
-
- +----------------------------------------------------------------------------+
- | Alkinoos Alexandros Argiropoulos A1200, '030@40, 6MB Fast |
- | Athens, Greece "AAA is not a chipset...It's my name" |
- +----------------------------------------------------------------------------+
-